package com.gsta.cdn.cdr.controller;

import com.gsta.cdn.cdr.entity.ResultEntity;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;

@Controller
@RequestMapping("")
public class ListenController {
    //全局分辨率统计
    @PostMapping(value = "/data")
//            @RequestMapping(path = "/data", method = RequestMethod.GET)
    @ResponseBody
    public String ResolutionTypeAll(@RequestParam(required = true) String data,
                                          HttpServletResponse response) {

        response.setHeader("Access-Control-Allow-Origin", "*");
        response.setHeader("Cache-Control", "no-cache");

        try {
            String SS="SUCCESS";
            System.out.println("返回结果："+data);
            return data;
        } catch (Exception e) {
            System.out.println("error");
            String SS="error";
            return SS;
        }
    }
}
